//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package 力扣.题库.未分类;

import java.util.HashSet;

public class demo_3375 {
    public demo_3375() {
    }

    public int minOperations(int[] nums, int k) {
        HashSet<Integer> set = new HashSet();

        for(int num : nums) {
            if (num > k) {
                set.add(num);
            }

            if (num < k) {
                return -1;
            }
        }

        return set.size();
    }
}
